<template>
  <el-dialog  class="login-pup" v-model="loginShow" title="" width="412" @close="closepup" :show-close="true">
    <zb-login v-if="userStore.loginshow == 1" @confirm="jobShowFun" />
    <zb-login-bindmobile v-if="userStore.loginshow == 2 && !wapJobShow" @confirm="jobShowFun2" />
    <zb-login-info v-if="wapJobShow" @close="closepup" />
  </el-dialog>
  <!-- pc端 简历弹窗显示功能 -->
  <el-dialog :append-to-body="true" class="job-dialog" v-model="jobShow" title="" width="460" :show-close="false">
    <zb-login-job @ok="jobShow = false" />
  </el-dialog>
</template>

<script lang="ts" setup>
import { getresumeApi } from '@/api/app';
import { ref, computed } from 'vue';
import { useUserStore } from "@/stores/user";
const userStore = useUserStore();
const loginShow = computed(()=>{
  return userStore.loginshow == '1' || userStore.loginshow == '2' ? true : false;
});
console.log('userStore.loginpup----------------', userStore.loginshow)
  // pc-登陆后受否需要完善简历
const jobShow = ref(false)
const jobShowFun = () => {
  getresumeApi().then((res1:any)=>{
    if(!res1){
      jobShow.value = true;
    }
  })
}
// 关闭弹窗
const closepup = () => {
  userStore.setLoginShow('0');
  wapJobShow.value = false;
}

const wapJobShow = ref(false)
const jobShowFun2 = () => {
  getresumeApi().then((res1:any)=>{
    if(!res1){
      wapJobShow.value = true;
    }else{
      closepup()
    }
  }).catch(()=>{
    // wapJobShow.value = true;
  })
}
</script>

<style>

</style>
